package lab.craft;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

public class Play {
    public static void main(String[] args) {
        // test computeIfAbsent
        Map<String, Set<String>> map = new HashMap<>();
        Set<String> testSet = map.computeIfAbsent("demo", k -> new HashSet<>());
        testSet.add("demoSet");
        System.out.println(testSet);
        System.out.println(map);
    }
}
